package com.qcby.mycommunity_003.controller;


import com.qcby.mycommunity_003.annotation.LogAnnotation;
import com.qcby.mycommunity_003.service.LogService;
import com.qcby.mycommunity_003.util.Result;
import com.qcby.mycommunity_003.vo.LogVo;
import com.qcby.mycommunity_003.vo.PageVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 * 操作日志表 前端控制器
 * </p>
 *
 * @author admin
 * @since 2024-04-03
 */
@RestController
@RequestMapping("/sys/log")
public class LogController {
    /**
     * 日志列表的展示
     * @return
     */
    @Autowired
    private LogService logService;

    /**
     * 展示列表，日志信息
     * @param logVo
     * @return
     */
    @GetMapping("/list")
    public Result list(LogVo logVo){
    PageVo data=logService.getlist(logVo);
    return Result.ok().put("data",data);
     }
    @LogAnnotation("删除日志")
   @DeleteMapping("/del")
   public Result del(@RequestBody List<Integer> ids){
       logService.removeByIds(ids);
       return Result.ok();
   }
}

